console.log(process.env['ENV'])
console.log(process.env.VUE_APP_BASE_API)
// 代码压缩
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
module.exports = {
    title: process.env.VUE_APP_TITLE || '数智乡村智慧管控平台', // 网页标题,
    port: process.env.port || process.env.npm_config_port || 80, // 端口
    publicPath: process.env.VUE_APP_PUBLIC_PATH,
    cdn: {
        css: [
            '//unpkg.zhimg.com/vuescroll@4.9.0-beta.18/dist/vuescroll.css'
        ],
        js: [
            '//unpkg.zhimg.com/vuescroll@4.9.0-beta.18/dist/vuescroll.min.js'
        ]
    },
    externals: {
        "vuescroll": "vuescroll"
    },
    iconsPath: 'src/assets/icons', //   src/assets/icons
    plugins: [
        new UglifyJsPlugin({
            uglifyOptions: {
                compress: {
                    drop_debugger: true,  //清除 debugger 语句
                    drop_console: false,   //清除console语句
                    pure_funcs: ['console.log', 'console.dir']
                },
                output: {
                    // 去掉注释内容
                    comments: true
                }
            },
            sourceMap: false,
            parallel: true
        })
    ],
    globalScss: "./src/assets/styles/utils.scss", //全局scss变量
    env: ['development', 'shop', 'admin', 'agent'], //开发环境集合
    devServer: { // 接口环境配置
        'development': 'https://47.122.24.232:8081', //测试环境
        'shop': 'https://sevintersite.aicheduoduo.com', //测试环境
        'admin': 'https://sevintersite.aicheduoduo.com', //测试环境
        'agent': 'https://sevintersite.aicheduoduo.com', //测试环境
    }
}
